package edu.fight.utils.jwt;

import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.Hashtable;
import java.util.Map;

public class RsaFileInMemory {

    private static final Map<String,Object> keys=new Hashtable<>();

    public static PrivateKey getPrivateKey(){
        PrivateKey privateKey = (PrivateKey) keys.get("privateKey");
        return privateKey;
    }

    public static PublicKey getPublicKey(){
        PublicKey publicKey = (PublicKey) keys.get("publicKey");
        return publicKey;
    }

    public static void setPublicKey(Object publicKey){
        keys.put("publicKey",publicKey);
    }
    public static void setPrivateKey(Object privateKey){
        keys.put("privateKey",privateKey);
    }

}
